Skip to content

Log migration#178

Open
rslater-cs wants to merge 6 commits intomigration-basefrom
log-migration
Open

Log migration#178
rslater-cs wants to merge 6 commits intomigration-basefrom
log-migration

Conversation

@rslater-cs
Copy link
Contributor

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Description

Keeps same features as previous log service but using fiber scopes, changing endpoints to fit the runtime proposal and adds tests for checking bus messages and that all modes exist. Check the log spec for more detail.

Manual test

  • 👍 yes
  • 🙅 no

Manual test description

copy the code over to a box and run
DEVICECODE_CONFIG_DIR=./configs/ DEVICECODE_SERVICES=config,hal,gsm,log luajit main.lua

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 docs/specs/log.md
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the log service to the “new fibers” service pattern (scopes + standard start(conn, opts) entrypoint), updates runtime/bus behavior accordingly, and adds a spec + service-level tests to validate published bus messages and lifecycle states.

Changes:

  • Refactors services.log into a fibers-scope-driven singleton that publishes {'logs', <level>} entries and retains {'svc', <name>, 'status'} lifecycle status.
  • Adds comprehensive LuaUnit tests covering singleton behavior, bus publishing, and lifecycle start/stop.
  • Introduces docs/specs/log.md documenting levels, bus message shapes, and lifecycle flow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/services/log.lua Refactors log service to fibers scopes, standard start(conn, opts) signature, bus publish/retain behavior
tests/test_log.lua Adds service-level tests for log singleton methods, bus publishing, and lifecycle retained status
docs/specs/log.md Adds a log service specification describing API, topics, payloads, and lifecycle

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@rslater-cs rslater-cs marked this pull request as ready for review March 18, 2026 09:42
@rslater-cs rslater-cs requested review from corp0529 and cpunt March 18, 2026 09:42
@rslater-cs rslater-cs deleted the branch migration-base March 24, 2026 16:07
@rslater-cs rslater-cs closed this Mar 24, 2026
@rslater-cs rslater-cs reopened this Mar 24, 2026
@rslater-cs rslater-cs changed the base branch from hal-migration to migration-base March 24, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants